﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace GraphViewer.Configuration
{
    public class EnvironmentConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("controlM", IsRequired = true)]
        [ConfigurationCollection(typeof(ControlMConfigurationElement), AddItemName = "add")]
        public ConfigurationCollection<ControlMConfigurationElement> ControlM
        {
            get
            {
                return (ConfigurationCollection<ControlMConfigurationElement>)this["controlM"];
            }
        }

        [ConfigurationProperty("dataBases", IsRequired = true)]
        [ConfigurationCollection(typeof(DataBaseConfigurationElement), AddItemName = "add")]
        public ConfigurationCollection<DataBaseConfigurationElement> DataBases
        {
            get
            {
                return (ConfigurationCollection<DataBaseConfigurationElement>)this["dataBases"];
            }
        }

        [ConfigurationProperty("processes", IsRequired = false)]
        [ConfigurationCollection(typeof(ProcessConfigurationElement), AddItemName = "add")]
        public ConfigurationCollection<ProcessConfigurationElement> Processes
        {
            get
            {
                return (ConfigurationCollection<ProcessConfigurationElement>)this["processes"];
            }
        }

        [ConfigurationProperty("dependencies", IsRequired = false)]
        [ConfigurationCollection(typeof(DependencyConfigurationElement), AddItemName = "add")]
        public DependencyConfigurationCollection Dependencies
        {
            get
            {
                return (DependencyConfigurationCollection)this["dependencies"];
            }
        }

        [ConfigurationProperty("externalDependencies", IsRequired = false)]
        [ConfigurationCollection(typeof(DependencyConfigurationElement), AddItemName = "add")]
        public DependencyConfigurationCollection ExternalDependencies
        {
            get
            {
                return (DependencyConfigurationCollection)this["externalDependencies"];
            }
        }
    }
}
